x86/emul: Correct the handling of eflags with SYSCALL
authorAndrew Cooper <andrew.cooper3@citrix.com>
Sun, 18 Dec 2016 15:42:59 +0000 (15:42 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 19 Dec 2016 15:46:00 +0000 (15:46 +0000)
commitb996efb23864f7135db3578a3a2059fe2f3c1a98
treedeade876ec97bbd12c7d179b36d126e22a1f530b
parent7967dafe6acce66193a8a81fa88ac4d3eb7b48aa
x86/emul: Correct the handling of eflags with SYSCALL

A singlestep #DB is determined by the resulting eflags value from the
execution of SYSCALL, not the original eflags value.

By using the original eflags value, we negate the guest kernels attempt to
protect itself from a privilege escalation by masking TF.

Have the SYSCALL emulation recalculate tf after the instruction is complete.

This is XSA-204

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/x86_emulate/x86_emulate.c